package com.proxy.staticproxy;

/**
 * @author zhupanlin
 * @version 1.0
 * @description: TODO
 * @date 2024/4/16 14:13
 */
// 代理对象，静态代理
public class TeacherDaoProxy implements ITeacherDao{
    
    // 被代理对象，通过接口来聚合
    private ITeacherDao target;

    public TeacherDaoProxy(ITeacherDao target) {
        this.target = target;
    }

    @Override
    public void teach() {
        System.out.println("开始代理 完成某些操作。。。。");
        target.teach();
        System.out.println("代理结束。。。。");
    }
}
